package com.turing.post.report.util;

import java.util.Date;
import java.util.List;

import javax.ejb.Local;
import javax.ejb.Remote;

import com.turing.post.util.PCPSApplicationException;
import com.turing.post.util.PCPSWebInput;

/**
 * 销售机构资金日结表Dao接口
 * 
 * @author yxb
 * 
 */
@Remote
@Local
public interface SaleCapitalDaySettlementDao {

	/**
	 * 插入对象
	 * 
	 * @param scds
	 */
	public void insert(SaleCapitalDaySettlement scds)
			throws PCPSApplicationException;

	/**
	 * 根据主键查找
	 * 
	 * @param scds
	 * @return
	 */
	public SaleCapitalDaySettlement getSaleCapitalDaySettlementByKey(
			SaleCapitalDaySettlement scds);

	/**
	 * 删除某发卡商某日所有的销售机构资金日结数据
	 * 
	 * @param issueCompanyNo
	 *            发卡商号
	 * @param tranDate
	 *            帐务日期
	 */
	public void removeAllSaleCapitalDaySettlementByTranDate(
			String issueCompanyNo, Date tranDate);

	/**
	 * 根据日期、销售机构号检索小于该日期的最大日期
	 * 
	 * @param tranDate
	 *            帐务日期
	 * @param saleBranchNo
	 *            销售分支机构号
	 * @return
	 */
	public Date getMaxTranDate(Date tranDate, String saleBranchNo);

	/**
	 * 预付款结余统计表
	 * 
	 * @param webInput
	 * @param startTranDate
	 * @param endTranDate
	 * @return
	 */
	public List<Object[]> getPrepaymentBalanceReport(PCPSWebInput webInput,
			String startTranDate, String endTranDate);

	/**
	 * 省内地市局准备金余额变动表
	 * 
	 * @param webInput
	 * @param startTranDate
	 * @param endTranDate
	 * @return
	 */
	public List<Object[]> getRegionReserveBalanceChangeReport(
			PCPSWebInput webInput, String startTranDate, String endTranDate);
}
